package com.easily.system.dict;

import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.Set;

public class ObjectMethods {
    private static final Set<String> methodNames = new HashSet<>();

    public static boolean isNotObjectMethod(String name){
        if (methodNames.size() == 0) {
            synchronized (ObjectMethods.class) {
                if (methodNames.size() == 0) {
                    Object o = new Object();
                    for (Method method : o.getClass().getMethods()) {
                        methodNames.add(method.getName());
                    }
                }
            }
        }
        return !methodNames.contains(name);
    }
}
